<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>layui扩展组件，仿elementUI的Notification 通知</title>
    <!-- 引入 layui.css -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/layui/2.9.9/css/layui.min.css" rel="stylesheet">
    <!-- 引入插件css -->
    <link href="ntf.css" rel="stylesheet">

</head>

<body>
    <button id="btn">按钮</button>
    <!-- 引入 layui.js -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/layui/2.9.9/layui.min.js"></script>
    <!-- 引入插件js -->
    <script src="ntf.js"></script>
    <script>
        layui.use(['ntf','jquery'],function(){
            let ntf = layui.ntf;
            let $ = layui.jquery;
            $("#btn").click(function(){
                ntf('这是一条Notification通知');
            })
        })
    </script>
</body>

</html>